package com.chen.common.security.exception;

import org.springframework.http.HttpStatus;
import org.springframework.security.oauth2.common.exceptions.OAuth2Exception;

/**
 * @author: Long
 * @date: 2023/6/13 21:31
 **/
public class SmsCodeException extends UserAuth2Exception {
    public SmsCodeException(String msg) {
        super(msg);
    }

    @Override
    public String getOAuth2ErrorCode() {
        return "unauthorized";
    }

    @Override
    public int getHttpErrorCode() {
        return HttpStatus.UNAUTHORIZED.value();
    }
}
